<?php
namespace Admin\Controller;
use Think\Controller;

class UploadsController extends Controller{
	public function index(){
		$this -> display();
	}
	public function upload(){
		$this -> ajaxReturn(uploadify());
	}
//添加Uploadify图册图片
	public function photoAdd(){
		$Data = D('PageGallery');
		if($Data -> create()){
			if($Data -> add($data) !== false){
				$data = array(
					'status'	=> 1,
					'msg'		=> '图片添加成功',
				);
			} else {
				$data = array(
					'status'	=> 0,
					'msg'		=> '图片添加失败',
				);
			}
		}
		$this -> ajaxReturn($data);
	}
}
